﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace _12306
{
    class CodingChange
    {
        public static string CharacterToCoding(string character)
        {
            string coding = "";
            for (int i = 0; i < character.Length; i++)
            {
                byte[] bytes = System.Text.Encoding.Unicode.GetBytes(character.Substring(i, 1));
                //取出二进制编码内容  
                string lowCode = System.Convert.ToString(bytes[0], 16);
                //取出低字节编码内容（两位16进制）  
                if (lowCode.Length == 1)
                    lowCode = "0" + lowCode;
                string hightCode = System.Convert.ToString(bytes[1], 16);
                //取出高字节编码内容（两位16进制）  
                if (hightCode.Length == 1)
                    hightCode = "0" + hightCode;
                coding += (lowCode + hightCode);//加入到字符串中,  
            }
            return coding;
        }
        class aaaa
        {

            static string GetpyChar(string c)
            {
                int ascCode = int.Parse(c);
                int temp = 65536 + ascCode;
                if (temp >= 45217 && temp <= 45252)
                {
                    return "A";
                }
                else if (temp >= 45253 && temp <= 45760)
                {
                    return "B";
                }
                else if (temp >= 45761 && temp <= 46317)
                {
                    return "C";
                }
                else if (temp >= 46318 && temp <= 46825)
                {
                    return "D";
                }


                else if (temp >= 46826 && temp <= 47009)
                {
                    return "E";
                }
                else if (temp >= 47010 && temp <= 47296)
                {
                    return "F";
                }
                else if (temp >= 47297 && temp <= 47613)
                {
                    return "G";
                }
                else if (temp >= 47614 && temp <= 48118)
                {
                    return "H";
                }
                else if (temp >= 48119 && temp <= 49061)
                {
                    return "J";
                }
                else if (temp >= 49062 && temp <= 49323)
                {
                    return "K";
                }
                else if (temp >= 49324 && temp <= 49895)
                {
                    return "L";
                }
                else if (temp >= 49896 && temp <= 50370)
                {
                    return "M";
                }
                else if (temp >= 50371 && temp <= 50613)
                {
                    return "N";
                }
                else if (temp >= 50614 && temp <= 50621)
                {
                    return "O";
                }
                else if (temp >= 50622 && temp <= 50905)
                {
                    return "P";
                }
                else if (temp >= 50906 && temp <= 51386)
                {
                    return "Q";
                }
                else if (temp >= 51387 && temp <= 51445)
                {
                    return "R";
                }
                else if (temp >= 51446 && temp <= 52217)
                {
                    return "S";
                }
                else if (temp >= 52218 && temp <= 52697)
                {
                    return "T";
                }
                else if (temp >= 52698 && temp <= 52979)
                {
                    return "W";
                }
                else if (temp >= 52980 && temp <= 53688)
                {
                    return "X";
                }
                else if (temp >= 53689 && temp <= 54480)
                {
                    return "Y";
                }
                else if (temp >= 54481 && temp <= 62289)
                {
                    return "Z";
                }
                else
                {
                    return c.ToString();
                }
            }
        }
    }
}